<%--
	author:ryan
	time:2012/10/13 23:41:29
--%>



<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib uri="TowkerTagLib" prefix="rbac"%>
<%@ taglib uri="/WEB-INF/tags/CommonFunction.tld" prefix="cfn" %>
<%@include file="/commons/include/html_doctype.html"%>
<html>
<head>
	<title>产品大类修改</title>
	<%@include file="/commons/include/upd.jsp" %>
	<script type="text/javascript">
$(function(){
	
	jQuery("#dataForm").validate(
	{
		rules: {
			class_name:{
				required:true
			},
			class_code:{
				required:true
			}
		},
		messages: {
			class_name:{
				required:"请填写产品小类名称"
			},
			class_code:{
				required:"请填写产品小类编码"
			}
		},
		submitHandler:function(form)
		{
			jQuery.ajax({
				url : ctx + '/manage/basicData/checkExistsBigClassCode.htm',
				type : "POST",
				data : {id:$('#classId').val(),calss_code:$('#calss_code').val()},
				dataType : "json",
				success : function(d) {
				if(!d.result)
					jQuery(form).ajaxSubmit(_options);
				else
					alert('大类代码有重复!');
				},error:function(){
				   alert('后台验证公司大类出错');
				}
			});
		}
	});
});
_callback = function() {
	location.href = ctx + "/manage/basicData/getGoodsBigClass.htm";
}
validCallBack = function()
{
	//添加页面自定义校验

	return true;
};
	</script>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" class="listLogo">
	<tr>
		<td class="title">产品大类修改</td>
		<td>
			<div class="menuTool">
				<a class="save" id="dataFormSave" href="#">保存</a>
				<a class="back" href="getGoodsBigClass.htm">返回</a>
			</div>
		</td>
	</tr>
</table>
<div class="line"></div>
<form id="dataForm" method="post" action="updGoodsBigClass2.htm">
<table border="0" cellspacing="1" cellpadding="0" class="listTable">
	<tr>
		<td class="form_title">名称：</td>
		<td class="form_input"><input type="text" id="class_name" name="class_name" value="${fn:escapeXml(po.class_name)}" /></td>
		<td class="form_title">代码：</td>
		<td class="form_input"><input type="text" id="calss_code" name="calss_code" value="${fn:escapeXml(po.calss_code)}" /></td>
	</tr>
</table>
<input type="hidden" name="id" id="classId" value="${po.id}" />
</form>
</body>
</html>
